<h1><span class="nproduct_ico"></span><?= lang('label_advanced_search') ?></h1>

<ul class="breadcrumb">
    <li><a href="<?= base_url() ?>"><?= lang('label_home') ?></a></li>
    <li><?= lang('label_advanced_search') ?></li>
</ul>


<div class="page">

    <div class="search_note">
        <?= lang('label_advanced_search_note') ?>
    </div>

    <form class="forms5 search_bg" action="<?php echo base_url('products/advanced') ?>" method="post">

        <div class="searchleft">
            <div class="text">
                <label for="keyword"><?= lang('label_meta_keyword') ?></label>
                <samp>
                    <input type="text" name="keyword" id="keyword" placeholder="<?= lang('label_meta_keyword') ?>" >
                </samp>
            </div>
            <div class="select">
                <label for="prodmaincat"><?= lang('label_main_cat') ?></label>
                <samp>
                    <select name="maincat" id="prodmaincat">
                        <option value="0" <?php if (form_val('maincat') == '0') echo 'selected' ?> ><?= lang('label_select_maincat') ?></option>
                        <?php
                        if ($maincats) {
                            foreach ($maincats as $mcat) {
                                ?>
                                <option value="<?= $mcat->id ?>" <?php if (form_val('maincat') == $mcat->id) echo 'selected' ?>>
                                    <?php $title = unserialize($mcat->title);
                                    echo (isset($title[LANG])) ? $title[LANG] : ((LANG == 'ar') ? $title['en'] : $title['ar']); ?></option>
                                <?php
                            }
                        }
                        ?>
                    </select>
                </samp>
            </div>
            <div class="select">
                <label for="prodsubcats"><?= lang('label_sub_cat') ?></label>
                <samp>
                    <select name="subcat" id="prodsubcats">
                        <option value="0"><?= lang('label_select_subcat') ?></option>
                    </select>
                </samp>
            </div>
            <div class="select">
                <label for="prodtrademark"><?= lang('label_menu_link_trade') ?> :</label>
                <samp>
                    <select name="trademark" id="prodtrademark">
                        <option value="0" <?php if (form_val('maincat') == '0') echo 'selected' ?>><?= lang('label_select_trademark') ?></option>
                        <?php
                        if ($trades) {
                            foreach ($trades as $trade) {
                                ?>
                                <option value="<?= $trade->id ?>" <?php if (form_val('maincat') == $trade->id) echo 'selected' ?>><?= $trade->title ?></option>
                                <?php
                            }
                        }
                        ?>
                    </select>
                </samp>
            </div>
            <div class="radio">
                <label><?= lang('label_prod_condition') ?></label>
                <samp>
                    <input name="condition" id="all" value="all" type="radio" checked><label for="all"><?= lang('label_all') ?></label>
                    <input name="condition" id="new" value="new" type="radio"><label for="new"><?= lang('label_condition_new') ?></label>
                    <input name="condition" id="used" value="used" type="radio"><label for="used"><?= lang('label_condition_used') ?></label>
                </samp>
            </div>
            <div class="text">
                <label for="storename"><?= lang('label_store') . ' ' . lang('label_name') ?></label>
                <samp>
                    <input type="text" name="storename" id="storename" placeholder="<?= lang('label_store') . ' ' . lang('label_name') ?>" />
                </samp>
            </div>
            <div id="additional"></div>
        </div>




        <div class="searchright">
            <div class="prosize">
                <label for="video"><?= lang('label_product_size') ?> :</label>
                <ul>
                    <li>
                        <div class="checkbox">
                            <samp>XS</samp>
                            <input type="checkbox" name="size[]" value="xs" id="xs" /><label for="xs"></label>
                        </div>
                    </li>
                    <li>
                        <div class="checkbox">
                            <samp>S</samp>
                            <input type="checkbox" name="size[]" value="s" id="s" /><label for="s"></label>
                        </div>
                    </li>
                    <li>
                        <div class="checkbox">
                            <samp>M</samp>
                            <input type="checkbox" name="size[]" value="m" id="m" /><label for="m"></label>
                        </div>
                    </li>
                    <li>
                        <div class="checkbox">
                            <samp>L</samp>
                            <input type="checkbox" name="size[]" value="l" id="l" /><label for="l"></label>
                        </div>
                    </li>
                    <li>
                        <div class="checkbox">
                            <samp>XL</samp>
                            <input type="checkbox" name="size[]" value="xl" id="xl" /><label for="xl"></label>
                        </div>
                    </li>
                    <li>
                        <div class="checkbox">
                            <samp>2 XL</samp>
                            <input type="checkbox" name="size[]" value="xxl" id="xxl" /><label for="xxl"></label>
                        </div>
                    </li>
                </ul>
            </div>

            <div class="color">
                <label for="video"><?= lang('label_product_color') ?> :</label>
                <ul>
                    <li class="color1">
                        <div class="checkbox">
                            <samp></samp>
                            <input type="checkbox" name="color[]" value="gray" id="color1" /><label for="color1"></label>
                        </div>
                    </li>
                    <li class="color2">
                        <div class="checkbox">
                            <samp></samp>
                            <input type="checkbox" name="color[]" value="white" id="color2" /><label for="color2"></label>
                        </div>
                    </li>
                    <li class="color3">
                        <div class="checkbox">
                            <samp></samp>
                            <input type="checkbox" name="color[]" value="black" id="color3" /><label for="color3"></label>
                        </div>
                    </li>
                    <li class="color4">
                        <div class="checkbox">
                            <samp></samp>
                            <input type="checkbox" name="color[]" value="red" id="color4" /><label for="color4"></label>
                        </div>
                    </li>
                    <li class="color5">
                        <div class="checkbox">
                            <samp></samp>
                            <input type="checkbox" name="color[]" value="blue" id="color5" /><label for="color5"></label>
                        </div>
                    </li>
                    <li class="color6">
                        <div class="checkbox">
                            <samp></samp>
                            <input type="checkbox" name="color[]" value="green" id="color6" /><label for="color6"></label>
                        </div>
                    </li>
                    <li class="color7">
                        <div class="checkbox">
                            <samp></samp>
                            <input type="checkbox" name="color[]" value="yellow" id="color7" /><label for="color7"></label>
                        </div>
                    </li>
                    <li class="color8">
                        <div class="checkbox">
                            <samp></samp>
                            <input type="checkbox" name="color[]" value="brown" id="color8" /><label for="color8"></label>
                        </div>
                    </li>
                </ul>
            </div>

            <div class="text">
                <label class="pricefromlabel" for="pricefrom"><?= lang('label_product_price') . ' ' . lang('label_from') ?> :</label>
                <samp>
                    <input type="text" name="pricefrom" id="pricefrom" value="" style="width:90px;" />
                </samp>
                <label style="width: 38px;text-indent: 5px;" for="priceto"><?= lang('label_to') ?> :</label>
                <samp>
                    <input type="text" name="priceto" id="priceto" value="" style="width:90px;" >
                </samp>
            </div>

            <div class="checkbox checkbox2">
                <input type="checkbox" name="sproducts" id="sproducts" /><label for="sproducts"><?= lang('label_sproduct_only') ?></label>
            </div>

            <div class="checkbox checkbox2">
                <input type="checkbox" name="offers" id="offers" /><label for="offers"><?= lang('label_have_offers_only') ?></label>
            </div>

            <div class="submit">
                <input name="submit" value="<?= lang('label_search') ?>" type="submit"  />
            </div>
        </div>




    </form>
</div>
<style>
    .forms5 div.textarea textarea{
        width: 215px;
        height: 78px
    }
</style>